﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DBAccess.Business;

public partial class Proccess_UpdateLikeFacebook : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            string url = Request["href"];
            url = url.Replace("http://cuoimotminh.com/hinh-anh/", "");
            string id = url.Substring(0, url.IndexOf('-'));
            string val = Request["val"];
            int num = 1;
            if (val == "like")
            {
                bool rs = SubjectBusiness.UpdateLikeSubject(int.Parse(id));
            }
            else if (val == "unlike")
            {
                bool rs = SubjectBusiness.UpdateUnLikeSubject(int.Parse(id));
            }

        }
        catch
        {

        }
    }
}